function diff = J_0_p_fun(m,param)

    diff = -2.*param.c.*(1-param.alpha)./param.sigma^2./(param.gamma_R_2-param.gamma_R_1).* ...
        ((1./(1-param.alpha)-param.gamma_R_1).*m.^param.gamma_R_1.*int_rep1_fun(m,param).*param.gamma_R_1./m ...
        -(1./(1-param.alpha)-param.gamma_R_2).*m.^param.gamma_R_2.*int_rep2_fun(m,param).*param.gamma_R_2./m ...    
        +(param.gamma_R_2-param.gamma_R_1).*(param.zeta+delta_m(m,param))./m );

end